package com.dwms.feign.oms;

import com.dwms.entity.ListRequest;
import com.dwms.entity.PageResponse;
import com.dwms.entity.QueryRequest;
import com.dwms.entity.Result;
import com.dwms.entity.oms.order.request.HsReceiptImportRequest;
import com.dwms.entity.oms.order.request.OrderQueryRequest;
import com.dwms.entity.oms.order.response.OrderResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: OrderController
 * @Description: Order
 * @Create 2025-09-10 17:29:49
 * @Author WH
 * @Since 1.0.0
**/
@FeignClient(name = "oms-server")
public interface OrderFeignClient {

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/order/findPage")
    Result<PageResponse<OrderResponse>> findPage(@RequestBody OrderQueryRequest query);

    /**
     *  根据ID查询
     *
     * @param query
     *          参数
     * @return
     */
    @PostMapping("/order/findById")
    Result findById(@RequestBody QueryRequest query);

    /**
     * 获取物流信息
     * @param query
     * @return
     */
    @RequestMapping("/order/waybill/getWaybill")
    Result getWaybill(@RequestBody QueryRequest query);

    /**
     * 订单导出
     *
     * @param query
     * @return
     */
    @PostMapping("/order/export")
    Result<String> export(@RequestBody QueryRequest query);

    /**
     * 导入海关回执
     * @param importRequests
     * @return
     */
    @PostMapping("/order/importHsReceipt")
    Result importHsReceipt(@RequestBody ListRequest<HsReceiptImportRequest> importRequests);

    /**
     * 批量申报
     * @param query
     * @return
     */
    @PostMapping("/order/batchDeclare")
    Result batchDeclare(@RequestBody QueryRequest query);

}
